Skip to content

fix: Move replicate to runtime dependency #3126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timkpaine
Copy link

@timkpaine timkpaine commented Jul 13, 2025

xref: conda-forge/opentelemetry-instrumentation-replicate-feedstock#20

import: 'opentelemetry.instrumentation.replicate'
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/opentelemetry-instrumentation-replicate_1752448577076/test_tmp/run_test.py", line 2, in <module>
    import opentelemetry.instrumentation.replicate
  File "/home/conda/feedstock_root/build_artifacts/opentelemetry-instrumentation-replicate_1752448577076/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.9/site-packages/opentelemetry/instrumentation/replicate/__init__.py", line 11, in <module>
    from opentelemetry.instrumentation.replicate.event_emitter import (
  File "/home/conda/feedstock_root/build_artifacts/opentelemetry-instrumentation-replicate_1752448577076/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.9/site-packages/opentelemetry/instrumentation/replicate/event_emitter.py", line 19, in <module>
    from replicate.prediction import Prediction
ModuleNotFoundError: No module named 'replicate'
  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

Important

Move replicate to runtime dependencies in pyproject.toml to fix import error.

  • Dependency Management:
    • Move replicate from [tool.poetry.group.dev.dependencies] to [tool.poetry.dependencies] in pyproject.toml.
    • Ensures replicate is available at runtime to prevent ModuleNotFoundError during import in event_emitter.py.

This description was created by Ellipsis for 053b35a. You can customize this summary. It will automatically update as commits are pushed.

xref: conda-forge/opentelemetry-instrumentation-replicate-feedstock#20

https://github.com/traceloop/openllmetry/blob/645426360910ce56d00894fc9c7feb47d5230953/packages/opentelemetry-instrumentation-replicate/opentelemetry/instrumentation/replicate/event_emitter.py#L19

```raw
import: 'opentelemetry.instrumentation.replicate'
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/opentelemetry-instrumentation-replicate_1752448577076/test_tmp/run_test.py", line 2, in <module>
    import opentelemetry.instrumentation.replicate
  File "/home/conda/feedstock_root/build_artifacts/opentelemetry-instrumentation-replicate_1752448577076/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.9/site-packages/opentelemetry/instrumentation/replicate/__init__.py", line 11, in <module>
    from opentelemetry.instrumentation.replicate.event_emitter import (
  File "/home/conda/feedstock_root/build_artifacts/opentelemetry-instrumentation-replicate_1752448577076/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.9/site-packages/opentelemetry/instrumentation/replicate/event_emitter.py", line 19, in <module>
    from replicate.prediction import Prediction
ModuleNotFoundError: No module named 'replicate'
```
@CLAassistant
Copy link

CLAassistant commented Jul 13, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 053b35a in 52 seconds. Click for details.
  • Reviewed 20 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/opentelemetry-instrumentation-replicate/pyproject.toml:27
  • Draft comment:
    Good move: replicating dependency is now correctly listed as a runtime dependency. Ensure that the version range (>=0.23.1,<0.27.0) is intended.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. packages/opentelemetry-instrumentation-replicate/pyproject.toml:38
  • Draft comment:
    Removing replicate from the dev dependencies is appropriate now since it's required at runtime.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it states that removing 'replicate' from the dev dependencies is appropriate. It doesn't provide a suggestion, ask for confirmation, or point out a potential issue. It simply informs about the appropriateness of the change, which violates the rules.

Workflow ID: wflow_8rIvy0XtIogSGTuW

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@@ -24,6 +24,7 @@ opentelemetry-api = "^1.28.0"
opentelemetry-instrumentation = ">=0.50b0"
opentelemetry-semantic-conventions = ">=0.50b0"
opentelemetry-semantic-conventions-ai = "0.4.10"
replicate = ">=0.23.1,<0.27.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the comment in #3127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants